<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>ting Manager</title>
    <link href="/css/bootstrap.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="/">Ting</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="/course">课程</a></li>
                <li class="active"><a href="/upload">上传文件</a></li>
                <li><a href="/user">用户管理</a></li>
                <li><a href="/comment">评论</a></li>
            </ul>
        </div>
    </div>
</nav>
<% if(link) { %>
<div class="alert alert-warning alert-dismissible" role="alert">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <strong>路径: </strong> <%= link %>
</div>
<% } %>
<div class="panel panel-default">
    <div class="panel-heading">
        <h2 class="panel-title" style="margin-left: 20px">添加课程</h2>
    </div>
    <div class="panel-body">
        <form class="form-horizontal" method="post" action="/upload" enctype="multipart/form-data">
            <div class="form-group">
                <label for="key" class="col-sm-2 control-label">文件Key:</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="key" name="key" placeholder="name">
                </div>
            </div>
            <div class="form-group">
                <label for="expire" class="col-sm-2 control-label">expire:</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="expire" name="expire" placeholder="-1:永久 | 0:一次性 | expire:毫秒后">
                </div>
            </div>
            <div class="form-group">
                <label for="file" class="col-sm-2 control-label">文件:</label>
                <div class="col-sm-8">
                    <input type="file" class="form-control" id="file" name="file">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-default">上传</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.js"></script>
</html>